<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Data Endpoint Transfer Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__usbfs__dev__hal__functions__data__xfer.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Data Endpoint Transfer Functions<div class="ingroups"><a class="el" href="group__group__usbfs__dev__drv.html">USBFS        (USB Full-Speed Device)</a> &raquo; <a class="el" href="group__group__usbfs__dev__drv__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>The Data Endpoint Transfer functions provide an API to establish communication with the USB Host using data endpoint. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf78e5b3f27c156336655d5e92e90dbc9"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#ga9a078f172cd82350179929c0133d9bbf">cy_en_usb_dev_ep_state_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#gaf78e5b3f27c156336655d5e92e90dbc9">Cy_USBFS_Dev_Drv_GetEndpointState</a> (USBFS_Type const *base, uint32_t endpoint, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> const *context)</td></tr>
<tr class="memdesc:gaf78e5b3f27c156336655d5e92e90dbc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the state of the endpoint.  <a href="#gaf78e5b3f27c156336655d5e92e90dbc9">More...</a><br /></td></tr>
<tr class="separator:gaf78e5b3f27c156336655d5e92e90dbc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65db7019eafec3e38e8fbca316f92673"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga65db7019eafec3e38e8fbca316f92673">Cy_USBFS_Dev_Drv_LoadInEndpoint</a> (USBFS_Type *base, uint32_t endpoint, uint8_t const *buffer, uint32_t size, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga65db7019eafec3e38e8fbca316f92673"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads data into the IN endpoint buffer.  <a href="#ga65db7019eafec3e38e8fbca316f92673">More...</a><br /></td></tr>
<tr class="separator:ga65db7019eafec3e38e8fbca316f92673"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga216a8de51d7d27d9fd74a716ebb5e394"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga216a8de51d7d27d9fd74a716ebb5e394">Cy_USBFS_Dev_Drv_EnableOutEndpoint</a> (USBFS_Type *base, uint32_t endpoint, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga216a8de51d7d27d9fd74a716ebb5e394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the OUT data endpoint to be read by the Host.  <a href="#ga216a8de51d7d27d9fd74a716ebb5e394">More...</a><br /></td></tr>
<tr class="separator:ga216a8de51d7d27d9fd74a716ebb5e394"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3699408b8336670b36c2e7a3fa6949d7"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga3699408b8336670b36c2e7a3fa6949d7">Cy_USBFS_Dev_Drv_ReadOutEndpoint</a> (USBFS_Type *base, uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga3699408b8336670b36c2e7a3fa6949d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads data from the OUT endpoint buffer.  <a href="#ga3699408b8336670b36c2e7a3fa6949d7">More...</a><br /></td></tr>
<tr class="separator:ga3699408b8336670b36c2e7a3fa6949d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4dba7b4e7a47b69f1732d5a216382eb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#gae4dba7b4e7a47b69f1732d5a216382eb">Cy_USBFS_Dev_Drv_Abort</a> (USBFS_Type *base, uint32_t endpoint, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:gae4dba7b4e7a47b69f1732d5a216382eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort operation for data endpoint.  <a href="#gae4dba7b4e7a47b69f1732d5a216382eb">More...</a><br /></td></tr>
<tr class="separator:gae4dba7b4e7a47b69f1732d5a216382eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d912602fc11725b601da1d31db64fb1"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga8d912602fc11725b601da1d31db64fb1">Cy_USBFS_Dev_Drv_GetEndpointAckState</a> (USBFS_Type const *base, uint32_t endpoint)</td></tr>
<tr class="memdesc:ga8d912602fc11725b601da1d31db64fb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the transaction completed with ACK for a certain endpoint.  <a href="#ga8d912602fc11725b601da1d31db64fb1">More...</a><br /></td></tr>
<tr class="separator:ga8d912602fc11725b601da1d31db64fb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga894066c0e057ad7fe16d60a1cd2dd5fa"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga894066c0e057ad7fe16d60a1cd2dd5fa">Cy_USBFS_Dev_Drv_GetEndpointCount</a> (USBFS_Type const *base, uint32_t endpoint)</td></tr>
<tr class="memdesc:ga894066c0e057ad7fe16d60a1cd2dd5fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data bytes in the transaction for a certain endpoint.  <a href="#ga894066c0e057ad7fe16d60a1cd2dd5fa">More...</a><br /></td></tr>
<tr class="separator:ga894066c0e057ad7fe16d60a1cd2dd5fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91ccc0565bc5f64a01bc439f6ad6063f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga91ccc0565bc5f64a01bc439f6ad6063f">Cy_USBFS_Dev_Drv_StallEndpoint</a> (USBFS_Type *base, uint32_t endpoint, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga91ccc0565bc5f64a01bc439f6ad6063f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures data endpoint to STALL any request intended for it.  <a href="#ga91ccc0565bc5f64a01bc439f6ad6063f">More...</a><br /></td></tr>
<tr class="separator:ga91ccc0565bc5f64a01bc439f6ad6063f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f7b36adca0ee0371e6ae717c41c9ed3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga1f7b36adca0ee0371e6ae717c41c9ed3">Cy_USBFS_Dev_Drv_UnStallEndpoint</a> (USBFS_Type *base, uint32_t endpoint, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga1f7b36adca0ee0371e6ae717c41c9ed3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release data endpoint STALL condition and clears data toggle bit.  <a href="#ga1f7b36adca0ee0371e6ae717c41c9ed3">More...</a><br /></td></tr>
<tr class="separator:ga1f7b36adca0ee0371e6ae717c41c9ed3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf78e5b3f27c156336655d5e92e90dbc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf78e5b3f27c156336655d5e92e90dbc9">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_GetEndpointState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#ga9a078f172cd82350179929c0133d9bbf">cy_en_usb_dev_ep_state_t</a> Cy_USBFS_Dev_Drv_GetEndpointState </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the state of the endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data endpoint state <a class="el" href="group__group__usbfs__dev__drv__enums.html#ga9a078f172cd82350179929c0133d9bbf">cy_en_usb_dev_ep_state_t</a>. </dd></dl>

</div>
</div>
<a id="ga65db7019eafec3e38e8fbca316f92673"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga65db7019eafec3e38e8fbca316f92673">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_LoadInEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_LoadInEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads data into the IN endpoint buffer. </p>
<p>After data loads, the endpoint is ready to be read by the host.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The IN data endpoint number.</td></tr>
    <tr><td class="paramname">buffer</td><td>The pointer to the buffer containing data bytes to load.</td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes to load into the endpoint. This value must be less than or equal to endpoint maximum packet size.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
<a id="ga216a8de51d7d27d9fd74a716ebb5e394"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga216a8de51d7d27d9fd74a716ebb5e394">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_EnableOutEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_USBFS_Dev_Drv_EnableOutEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the OUT data endpoint to be read by the Host. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The OUT data endpoint number.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The OUT endpoints are not enabled by default. The endpoints must be enabled before calling <a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga3699408b8336670b36c2e7a3fa6949d7">Cy_USBFS_Dev_Drv_ReadOutEndpoint</a> to read data from an endpoint. </dd></dl>

</div>
</div>
<a id="ga3699408b8336670b36c2e7a3fa6949d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3699408b8336670b36c2e7a3fa6949d7">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_ReadOutEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_ReadOutEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>actSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads data from the OUT endpoint buffer. </p>
<p>Before executing a next read, the <a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga216a8de51d7d27d9fd74a716ebb5e394">Cy_USBFS_Dev_Drv_EnableOutEndpoint</a> must be called to allow the Host to write data into the endpoint.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The OUT data endpoint number.</td></tr>
    <tr><td class="paramname">buffer</td><td>The pointer to the buffer that stores read data.</td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes to read from the endpoint. This value must be less than or equal to the endpoint maximum packet size.</td></tr>
    <tr><td class="paramname">actSize</td><td>The number of actually read bytes.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
<a id="gae4dba7b4e7a47b69f1732d5a216382eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae4dba7b4e7a47b69f1732d5a216382eb">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_Abort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_Abort </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort operation for data endpoint. </p>
<p>If there is any bus activity after the abort operation requested, the function waits for its completion or a timeout. A timeout is the time to transfer the bulk or an interrupt packet of the maximum playload size. If this bus activity is a transfer to the aborting endpoint, the received data is lost and the endpoint transfer completion callbacks are not invoked. After the function returns a new read or write, the endpoint operation can be submitted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data endpoint state <a class="el" href="group__group__usbfs__dev__drv__enums.html#ga9a078f172cd82350179929c0133d9bbf">cy_en_usb_dev_ep_state_t</a> after abort was applied.</dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>This abort operation is not supported for the ISOC endpoints because these endpoints do not have a handshake and are always accessible to the USB Host. Therefore, an abort can cause unexpected behavior.</li>
<li>The function uses the critical section to protect from the endpoint transfer complete interrupt. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga8d912602fc11725b601da1d31db64fb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d912602fc11725b601da1d31db64fb1">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_GetEndpointAckState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE bool Cy_USBFS_Dev_Drv_GetEndpointAckState </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns whether the transaction completed with ACK for a certain endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ACK state: true - transaction completed with ACK, false - otherwise. </dd></dl>

</div>
</div>
<a id="ga894066c0e057ad7fe16d60a1cd2dd5fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga894066c0e057ad7fe16d60a1cd2dd5fa">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_GetEndpointCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_USBFS_Dev_Drv_GetEndpointCount </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of data bytes in the transaction for a certain endpoint. </p>
<p>Before calling this function, ensure the Host has written data into the endpoint. The returned value is updated after the Host access to the endpoint but remains unchanged after data has been read from the endpoint buffer. A typical use case is to read the number of bytes that the Host wrote into the OUT endpoint.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data bytes in the transaction. </dd></dl>

</div>
</div>
<a id="ga91ccc0565bc5f64a01bc439f6ad6063f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga91ccc0565bc5f64a01bc439f6ad6063f">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_StallEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_StallEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures data endpoint to STALL any request intended for it. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
<a id="ga1f7b36adca0ee0371e6ae717c41c9ed3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f7b36adca0ee0371e6ae717c41c9ed3">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_UnStallEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_UnStallEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Release data endpoint STALL condition and clears data toggle bit. </p>
<p>The endpoint is returned to the same state as it was before STALL request.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
